

/***********************************************************************/
/*                                                                     */
/*                  Copyright Hewlett-Packard Co. 1991                 */
/*                                                                     */
/***********************************************************************/

/***********************************************************************/
/* MODULE NAME:  config.c                                              */
/* ============                                                        */
/*                                                                     */
/* Author:  Rick Wikfors, Lesley Freed,                                */
/*                                                                     */
/* MODULE PURPOSE:  To declare all variables in the Instrument         */
/*                  Configuration data store.                          */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/***********************************************************************/


/*****************************/
/*   GLOBAL INCLUDE FILES    */
/*****************************/
#include <typedefs.h>
#include <p_config.h>
#include <zone_config.h>
#include <config.h>
#include <dig_path.h>

/*****************************/
/*   LOCAL INCLUDE FILES     */
/*****************************/


/*****************************/
/*   GLOBAL VARIABLES        */
/*****************************/

/***************** POWER FAIL PROTECTED RAM ALLOCATION *****************/


/* Start Address of Protected RAM. NOTE!! The PF_Start and    */
/*  PF_End check words are in separate sections so we can be  */
/*  sure that they surround the pfail section.  The C compiler*/
/*  doesn't always preserve the order in which data is        */
/*  declared!  Memory is zeroed after PF_End in a normal      */
/*  power fail recovery system boot.                          */

#pragma  SECTION UDATA=pfail

/*revisit used to support fake configs entered from keyboard  (rick) */
   BIT8 Dont_Use_Real_Configuration;
   BIT8 Hacksaw;

   ON_OFF Auto_Prep_Run;

   LANGUAGE  Language;
   BIT8      Radix_Char;
   BIT8      KeyClickEnabled;
   BIT8      WarningBeepEnabled;
   INT8      Status[STATUS_SIZE];
   BIT8      Keyboard_Lock;
   BIT8      SetptBeepEnabled;
   REV_CODE  Version;     /* ROM Version.Update.Fix codes */



   OVEN_ZONE_CONFIG Zone_Config; /* overall oven and zone configuration */

   ZONE_CONFIG      Oven_Zone_Config; /* power-fail thermal zone config.s    */
   ZONE_CONFIG      Deta_Zone_Config;
   ZONE_CONFIG      Detb_Zone_Config;
   ZONE_CONFIG      Inja_Zone_Config;
   ZONE_CONFIG      Injb_Zone_Config;
   ZONE_CONFIG      Auxa_Zone_Config;
   ZONE_CONFIG      Auxb_Zone_Config;

   /* Thermal EEPROM config */
   EEPROM_ZONE_INFO F_Inlet_Zone_Eeprom_Info;
   EEPROM_ZONE_INFO B_Inlet_Zone_Eeprom_Info;
   EEPROM_ZONE_INFO F_Det_Zone_Eeprom_Info;
   EEPROM_ZONE_INFO B_Det_Zone_Eeprom_Info;

   VALVE_CONFIG     Valve_Configs[8];
   U_INT32          Multi_Time;
   BIT8             Negative_Logic;   /* Use negative logic for BCD if TRUE */

   INST_CONFIG      Inst_Config;

/* Digital Data Configuration for SIGNAL1 and SIGNAL2 */
   DATA_FORMAT_TYPE   Data_Format[NUM_SIGNALS]; /* Digital data format   */
   ACQ_MODE_TYPE      Acq_Mode[NUM_SIGNALS];    /* Data acquisition mode  */

/* RS232 Configuration (saved copy for initialization) */
   SERIAL_PARMS_TYPE Init_Host_Port_Serial_Parms;

const SERIAL_PARMS_TYPE Default_Host_Port_Serial_Parms =
{ BR_9600, HS_NONE, PARITY_NONE, STOP_BITS_1, DATA_BITS_8, TERM_SEQ_LF };

const SERIAL_PARMS_TYPE On_Board_Computer_Serial_Parms =
{ BR_57600, HS_HARDWARE, PARITY_NONE, STOP_BITS_1, DATA_BITS_8, TERM_SEQ_LF };

const SERIAL_PARMS_TYPE Tower_Port_Parms =
{ BR_19200, HS_DUART_HW, PARITY_NONE, STOP_BITS_1, DATA_BITS_8, TERM_SEQ_LF };

const SERIAL_PARMS_TYPE Tray_Port_Parms =
{ BR_19200, HS_DUART_HW, PARITY_NONE, STOP_BITS_1, DATA_BITS_8, TERM_SEQ_LF };

const SERIAL_PARMS_TYPE Headspace_Port_Parms =
{ BR_19200, HS_DUART_HW, PARITY_NONE, STOP_BITS_1, DATA_BITS_8, TERM_SEQ_LF };
/*
{ BR_19200, HS_DUART_HW, PARITY_ODD, STOP_BITS_1, DATA_BITS_7, TERM_SEQ_CR };
*/


/* Host mailbox */
   HOST_MAILBOX_TYPE Mailbox[NMBR_MAILBOXES];

/* Detector Configuration */
   /* NOTE: the detector type info: DET_CONFIG is stored in the manufacturing    */
   /*       power-fail section in status.c                                       */
   DET_REC  DetectorA;              /* detector type & offset used by signal DSP */
   DET_REC  DetectorB;

/* Perkin Elmer Defect fix */
   ON_OFF   PE_Defect_Fix;

/* End Address of Protected RAM */

#pragma SECTION UNDO

/***************** END POWER FAIL PROTECTED RAM ALLOCATION *************/

/* Keyboard Locks for Data Comm */
   BIT8      Sequence_Lock;
   BIT8      DC_Keyboard_Lock;
   BIT8      LSMSeq_Lock;         /* Load/Store/Method/ClockTbl/Seq key lock */
   BIT8      Clock_Tbl_Lock;
   BIT8      CT_Execute_Lock;

/* Valve Configuration */

        BIT8    Valve_Box_Config;       /* Image of the 4 valve config bits   */
        U_INT8  Multi_Valve;            /* Valve# of multiposition valve      */
        U_INT8  Remote_Start_Valve;     /* Valve# of remote start valve       */
        U_INT8  Gsv1;                   /* Valve# of 1st GSV                  */
        U_INT8  Gsv2;                   /* Valve# of 2nd GSV                  */

/* Zone Configuration */

   CRYO_TYPE Cryo_Type;                 /* cryo type of the instrument        */
   BIT8      Single_Cryo;               /* boolean: TRUE:  no oven cryo & one
                                                           small zone cryo
                                                    FALSE: otherwise          */
   ZONE_TYPE Single_Cryo_Type;          /* zone location for single small zone
                                           with cryo and no oven cryo, NULL
                                           _ZONE otherwise                    */

/*****************************/
/*   EXTERNAL VARIABLES      */
/*****************************/


/*****************************/
/*   LOCAL DEFINES           */
/*****************************/


/*****************************/
/*   STATIC VARIABLES        */
/*****************************/


/*****************************/
/*   IMPLEMENT SECTION       */
/*****************************/





